package com.sacfa.rrhh.sql;

public class PuestoSQL {
	public static final String SELECT_ONE;
    public static final String SELECT_ALL;
    public static final String INSERT;
    public static final String UPDATE;
    public static final String DELETE;
    
    static {
        StringBuilder qryBuilder = new StringBuilder();

        qryBuilder.append("SELECT * FROM Puesto WHERE idPuesto = ?");
        SELECT_ONE = qryBuilder.toString();

        qryBuilder = new StringBuilder();
        qryBuilder.append("SELECT * FROM Puesto");
        SELECT_ALL = qryBuilder.toString();
        
        qryBuilder = new StringBuilder();
        qryBuilder.append("INSERT INTO Puesto VALUES(null, ?, ?)");
        INSERT = qryBuilder.toString();
        
        qryBuilder = new StringBuilder();
        qryBuilder.append("UPDATE Puesto set NombrePuesto = ?, Descripcion = ? WHERE idPuesto = ?");
        UPDATE = qryBuilder.toString();
        
        qryBuilder = new StringBuilder();
        qryBuilder.append("DELETE FROM Puesto WHERE idPuesto = ?");
        DELETE = qryBuilder.toString();
    }
}
